﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TarreOA.TarreOAModels;
using TarreOA.TarreOABLL;

public partial class Flow_Info_DeleteWork : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
        if(!Page.IsPostBack) {
            if(Request.QueryString.Get("WR_ID") != null) {
                User curLoginUser = (User) Session["user"];
                int wori_id = int.Parse(Request.QueryString.Get("WR_ID"));
                Flow_NewWork_Service fnw_service = new Flow_NewWork_Service();
                if(fnw_service.DelWorkById(wori_id) == 1) {
                    MessageAwoke.Instance().RemoveKeyFromWorkFlow(curLoginUser.LoginName);
                    Response.Redirect("WillTransactWork.aspx");
                }
            }
        }
    }
}
